# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui

# optional dependencies:
# * kio-extras: to enable thumbnails in the file browser
# * udisks2: for browsing mount points
pkgname=nota
pkgver=3.0.2
pkgrel=0
pkgdesc="Nota is a simple and convergent text editor"
# armhf blocked by qt5-qtdeclarative
# s390x, ppc64le and riscv64 blocked by qt5-qtwebengine
arch="all !armhf !s390x !ppc64le !riscv64"
url="https://invent.kde.org/maui/nota"
license="GPL-2.0-or-later"
depends="
	kde-icons
	mauikit-texteditor
	qmltermwidget
	qt5-qtbase-sqlite
	"
makedepends="
	attica5-dev
	extra-cmake-modules
	kconfig5-dev
	ki18n5-dev
	kio5-dev
	knotifications5-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	mauikit-texteditor-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtsvg-dev
	qt5-qtwebengine-dev
	samurai
	syntax-highlighting5-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/nota.git"
source="https://download.kde.org/stable/maui/nota/$pkgver/nota-$pkgver.tar.xz"
options="!check" # No tests available

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
727a9e231c2dc8c2a1965fbddb3544fff9718190263a14c9f2d1266ab9ad85eda958bb791c292784117e371f2b635c6d6e6f4545381086b8a0f061baf2d40e2f  nota-3.0.2.tar.xz
"
